package com.xuecheng.web.interceptors;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author Keson
 * @version 1.0.0
 * @title InterceptorConfig
 * @description <TODO description class purpose>
 * @create 2022/7/16 16:37
 */
@Configuration
public class InterceptorConfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new AuthInfoInterceptor())  //添加拦截器
                .addPathPatterns("/**");  //添加要拦截的路径
    }
}
